package com.yzt.message.activity;

import android.view.View;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.listener.OnItemClickListener;
import com.yzt.zhuju.arouter.RouterMessage;
import com.yzt.zhuju.base.BaseActivity;
import com.yzt.zhuju.network.entity.message.HandleAssistantMsg;
import com.yzt.message.R;
import com.yzt.message.adapter.SystemMessageAdapter;

/**
 * author : Irene
 * e-mail : 821970751@qq.com
 * date   : 2020/6/12 3:04 PM
 * desc   : 系统消息
 */
@Route(path = RouterMessage.ACTIVITY_SYSMSG)
public class SystemMessageActivity extends BaseActivity {

    private RecyclerView mMsgRecycler;

    private SystemMessageAdapter mAdapter;

    @Override
    public int getLayoutId() {
        return R.layout.activity_system_msg;
    }

    @Override
    public void installViews() {
        ARouter.getInstance().inject(this);
        mTitleBar.setTitle("系统通知");
        HandleAssistantMsg mHandleAssistantMsg = new HandleAssistantMsg();
        mMsgRecycler = findViewById(R.id.recycler_view);
        mMsgRecycler.setHasFixedSize(true);
        LinearLayoutManager layoutManager = new LinearLayoutManager(this);
        mMsgRecycler.setLayoutManager(layoutManager);
        mAdapter = new SystemMessageAdapter();
        mMsgRecycler.setAdapter(mAdapter);
        mAdapter.setOnItemClickListener(new OnItemClickListener() {
            @Override
            public void onItemClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
                RouterMessage.SystemMessageDetailActivity("1");
            }
        });
    }
}